home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93c.txt / 000038_icon-group-sender _Mon Aug 30 03:13:31 1993.msg < prev    next >
Internet Message Format  |  1994-02-02  |  2KB

  1. Received: from owl.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Mon, 30 Aug 1993 07:41:14 MST
  2. Received: by owl.cs.arizona.edu; Mon, 30 Aug 1993 07:41:13 MST
  3. Date: 30 Aug 93 03:13:31 GMT
  4. From: agate!howland.reston.ans.net!darwin.sura.net!sgiblab!wetware!indetech!pacbell!boo!seer!fxg@ucbvax.Berkeley.EDU  (Francis X. Guidry)
  5. Organization: Brad Lanam,  Walnut Creek, CA
  6. Subject: Re: system() function
  7. Message-Id: <CCJyAK.2MF@seer.gentoo.com>
  8. References: <1993Aug28.000650.682@jcnpc.cmhnet.org>
  9. Sender: icon-group-request@cs.arizona.edu
  10. To: icon-group@cs.arizona.edu
  11. Status: R
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13.  
  14. In article <1993Aug28.000650.682@jcnpc.cmhnet.org> jms@jcnpc.cmhnet.org (John M. Salimbene) writes:
  15. >    I have a 286 running under dos 3.3.  I use the system() function
  16. >to issue the VOL command to dos to see the volume label of the disk
  17. >in drive A:.  System() returns the dos exit code and not the response
  18. >returned by the VOL command.  Therefore x := system("Vol") does not
  19. >capture the volume label as returned by Vol but rather captures 0,
  20. >which is the exit code.
  21. >    Is there a way under ICON 8.0 to capture the volume label returned
  22. >by the dos Vol command as a string?  If so, how?
  23.  
  24. Redirect the output of the vol command to a file, then read the file.
  25.  
  26. system("vol >$$$.tmp")
  27. f := open("$$$.tmp")
  28. x := !f
  29. system("del $$$.tmp")
  30.  
  31. Actually, you'll have to do a bit of scanning to isolate just the
  32. volume label, but this should give you the idea.
  33.  
  34. Fran
  35.